<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<link rel="stylesheet" href="/css/main.css"/>
		<script>
			init = function() {
				getManifest();
				delete init;
			}

			getManifest = function() {
				var xhr = new XMLHttpRequest();
				xhr.open('GET', '/manifest.json', true);
				xhr.onreadystatechange = function() {
					if (xhr.readyState == 4) {
						var manifest = JSON.parse(xhr.responseText);
						document.getElementById('debug').innerHTML += 'Name: ' + manifest.name;
						document.getElementById('debug').innerHTML += '<br/>';
						document.getElementById('debug').innerText += 'Version: ' + manifest.version;
					}
				}
				xhr.send();
			}
		</script>
	</head>
	<body onload="init()">
		<h1>Access manifest properties</h1>
		<div id="debug"></div>
	</body>
</html>